package com.ruoyi.costumeShop.vo;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 输入ItemNo后实时更新当前订单的状态
 */
public class OrderVO {

    //订单编号
    private String orderNo;

    /**
     * 销售时间
     */
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date saleTime;
    /**
     * 总金额
     */
    private BigDecimal totalAmount;
    /**
     * 总件数
     */
    private Long totalQuantity;
    /**
     * 每条商品的销售明细
     */
    private List<SaleOrderCostumeVO> saleOrderCostumeVOList;

    @Override
    public String toString() {
        return "OrderVO{" +
                "orderNo='" + orderNo + '\'' +
                ", saleTime=" + saleTime +
                ", totalAmount=" + totalAmount +
                ", totalQuantity=" + totalQuantity +
                ", saleOrderCostumeVOList=" + saleOrderCostumeVOList +
                '}';
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Date getSaleTime() {
        return saleTime;
    }

    public void setSaleTime(Date saleTime) {
        this.saleTime = saleTime;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Long getTotalQuantity() {
        return totalQuantity;
    }

    public void setTotalQuantity(Long totalQuantity) {
        this.totalQuantity = totalQuantity;
    }

    public List<SaleOrderCostumeVO> getSaleOrderCostumeVOList() {
        return saleOrderCostumeVOList;
    }

    public void setSaleOrderCostumeVOList(List<SaleOrderCostumeVO> saleOrderCostumeVOList) {
        this.saleOrderCostumeVOList = saleOrderCostumeVOList;
    }
}
